#ifndef _GAL_CONTEXT_H_
#define _GAL_CONTEXT_H_

/// <summary>
/// The Context structure
/// describes a kernel-mode device
/// context to create.
/// </summary>
typedef struct _Context
{
	float left;
	float top;
	float right;
	float bottom;
	float line_width;
	void *handle;
	Rectangle clip;
	Matrix projection;
	SurfacePtr buffer;
	int comp_mode;
	int refcount;
	int type;
	int ref;

} Context, *ContextPtr;

/// <summary>
/// Context Pipeline
/// </summary>
extern ContextPtr GalCreateContext(void);
extern ContextPtr GalContextFromSurface(SurfacePtr surface);
extern int GalSetCompositingMode(ContextPtr ctx, int compositingMode);
extern int GalSetLineWidth(ContextPtr ctx, float width);
extern int GalContextFill(ContextPtr ctx, RectanglePtr rect, Color color);
extern int GalSetPixel(ContextPtr ctx, int x, int y, Color color);
extern int GalContextClear(ContextPtr ctx, Color color);
extern int GalDestroyContext(ContextPtr ctx);

#endif
